package juc;


import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;

class MyThread implements Runnable {
    @Override
    public void run() {

    }
}

class MyThread2 implements Callable<String>{

    @Override
    public String call() throws Exception {
        return "hello";
    }
}

/**
 * @author gcq
 * @Create 2020-12-03
 */
public class Test implements Runnable { // 新建类实现Runnable接口

    public static void main(String[] args) {
        FutureTask<String> futureTask = new FutureTask<String>(new MyThread2());
//        String s = futureTask.get();

    }
    @Override
    public void run() {
       new Thread(() -> {

       },"input thread name").start();
    }
}